{include file="public/head"/}
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">修改登录密码</div>
                <div class="layui-card-body" pad15>
                    <div class="layui-form" wid100 lay-filter="form">
                        <div class="layui-form-item">
                            <label class="layui-form-label">用户名</label>
                            <div class="layui-input-inline">
                                <input type="text" name="u_name" lay-verify="required" readonly="readonly" placeholder="请输入用户名" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">用户名在4到12个字符之间。</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">密码</label>
                            <div class="layui-input-inline">
                                <input type="password" name="u_pwd" placeholder="请输入登录密码" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">密码必须大于6位，小于15位。</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">邮箱</label>
                            <div class="layui-input-inline">
                                <input type="text" name="email"  lay-verify="email" placeholder="请输入用户邮箱" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">
                                用于密码找回，请认真填写。
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">手机号</label>
                            <div class="layui-input-inline">
                                <input type="text" name="tel" lay-verify="phone" placeholder="请输入手机号" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <input type="hidden" name="id">
                                <button class="layui-btn" lay-submit lay-filter="edit-but">确认保存</button>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/foot"/}
<script>
    layui.config({
        base: '__LAYDMIN__/',{if config('app.app_debug')}version: true{/if}
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index','admin','form'],function(){
        var form = layui.form;
		admin = layui.admin;
        form.val("form", {$info|raw|default=''});
		form.on('submit(edit-but)', function(data){
			var uri="{:url(SYS_PATH.'/index/password')}";
			admin.req({
				url: uri 
				, type: 'post'
				, data: data.field
				, success: function (res) {
					if(res.code==0){
						window.top.layer.msg(res.msg, {icon: 1, time: 1000,shade:[0.5,'#000000']});
					}else{
							window.top.layer.msg(res.msg, {icon: 2, time: 1000,shade:[0.5,'#000']});
							return;
					}
				}
			});
		});		
    });
</script>
</body>
</html>